package com.demo4;

public class Test {
    public static void main(String[] args) {
        Zi zi = new Zi();
        zi.show();
    }
}
class Fu{
    String name="Fu";
    String hobby="喝茶";
}

class Zi extends Fu{
    String name="Zi";
    String game="吃鸡";

    public void show(){
        //打印Zi
        System.out.println(this.name);//name
        //打印Fu
        System.out.println(super.name);
        //打印喝茶
        System.out.println(super.hobby);//hobby   this.hobby
        //打印刺吃鸡
        System.out.println(this.game);//game
    }
}